package net.xdclass.rbac_shiro.dao;

import net.xdclass.rbac_shiro.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @program: rbac_shiro
 * @description: 用户orm
 * @author: rZ
 * @create: 2020-01-10 10:36
 **/
public interface UserMapper {

    @Select("select * from user where username = #{username}")
    User findByUsername(@Param("username")String username);

    @Select("select * from user where id = #{userId}")
    User findById(@Param("userId")int id);

    @Select("select * from user where username = #{username} and password = #{pwd}")
    User findByUsernameAndPwd(@Param("username")String username,@Param("pwd")String pwd);
}
